package com.bootdo.wx.service.impl;

import com.bootdo.common.utils.PageHelperUtils;
import com.bootdo.wx.dao.TestDataDao;
import com.bootdo.wx.domain.TestDataDo;
import com.bootdo.wx.service.TestDataService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 检测参数
 *
 * Created by Administrator.
 *
 * @autor L - 2020/5/28 - 11:24.
 */

@Service
public class TestDataServiceImpl implements TestDataService {

    @Autowired
    private TestDataDao testDataDao;

    @Override
    public TestDataDo get(String id) {
        return testDataDao.get(id);
    }

    @Override
    public List<TestDataDo> list(Map<String, Object> map){
        return testDataDao.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return testDataDao.count(map);
    }

    @Override
    public int save(TestDataDo testData){
        return testDataDao.save(testData);
    }

    @Override
    public int update(TestDataDo testData){
        return testDataDao.update(testData);
    }

    @Override
    public int remove(String id){
        return testDataDao.remove(id);
    }

    @Override
    public int batchRemove(String[] ids){
        return testDataDao.batchRemove(ids);
    }

    //上传检测参数

    //历史数据
    @Override
    public PageInfo<TestDataDo> historyDataList(Map<String, Object> map) {
        PageHelperUtils.page(map);
        List<TestDataDo> list = testDataDao.list(map);
        PageInfo<TestDataDo> PageInfo = new PageInfo<>(list);
        return PageInfo;
    }

}
